<template>
    <div>
        <input v-model="title">
        <button @click="search">搜索</button>
        <ul>
            <li v-for="i in list">{{i.title}}</li>
        </ul>
    </div>
</template>

<script>
import axios from 'axios'
export default {
    data() {
        return {
            title:'',
            list:[]
        }
    },
    methods: {
        search(){
            this.axios.get('search?title='+this.title).then(res=>{
                this.list = res.data.list
            })
        }
    },
    created() {

    }
}
</script>

<style scoped>

</style>
